import React, { Component, PropTypes } from 'react';
import Module from '../../lib/module';


class carStore extends Module{
    constructor(props, context) {
        super(props, context);
        this.state = {
            carStore:"西湖店",
        };
    }




    componentDidMount() {
    }

    componentWillUnmount() {
    }

    storeClick (val){
        this.setState({
            carStore: val
        })
    }

    render() {
        let { carStore } = this.state;
        return <div className="car-store">
            <span>所属门店：</span>
            <ul>
                {
                    ["西湖店","滨江店","萧山店","XXX店"].map((item,index)=>{
                        return <li key={index} className={carStore === item && "car-store-click"} onClick={()=>this.storeClick(item)}>{item}</li>
                    })
                    }
            </ul>
            </div>
    }
}
export default carStore;